<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<title>中智融通</title>
		<style>
			html, body {
				margin: 0;
				padding: 0;
				height: 100%;
				background-color: #F0EED9;
				font: normal 100% Helvetica, Arial, sans-serif;
			}
			.main {
				position: relative;
				margin-top: 3%;
				padding-bottom: 3%;
				margin-left: 2%;
				margin-right: 2%;
				padding-bottom: 3%;
				padding-top: 3%;
				border-radius: 8px;
				background-color: #fff;
				border-color: #F0F0F0;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
				box-shadow: 0 0 3px #F0F0F0;
			}
			.form-group {
				padding-top: 2%;
				width: 90%;
				margin-left: 8%;
				margin-right: 5%;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
			}
			.label {
				display: block;
				font-weight: bold;
				font-size: 1.1em;
				line-height: 1;
				white-space: nowrap;
				vertical-align: baseline;
				border-radius: .25em;
			}

			.form-control {
				display: inline-block;
				width: 90%;
				font-size: 1.1em;
				padding: 6px 12px;
				line-height: 1.42857143;
				color: #555;
				background-color: #F6F6F6;
				border: 1px solid #ccc;
				border-radius: 6px;
				-webkit-appearance: none;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
			}
			.form-control:focus {
				border-color: #66afe9;
				outline: 0;
			}

			.form-control::-webkit-input-placeholder {
				color: #999;
			}
			textarea.form-control {
				height: auto;
			}
			.form-group label:last-child {
				padding-top: 8px;
				display: block;
				font-weight: normal;
				font-size: 1.2em;
			}
            .btn {
                display: inline-block;
                width: 100%;
                padding: 6px 12px;
                font-size: 1.05em;
                font-weight: normal;
                line-height: 1.42857143;
                text-align: center;
                text-decoration: none;
                white-space: nowrap;
                vertical-align: middle;
                cursor: pointer;
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;
                background-image: none;
                border: 1px solid transparent;
                border-radius: 4px;
                -webkit-box-sizing: border-box;
                box-sizing: border-box;
            }
            .btn:focus, .btn:active:focus, .btn.active:focus {
                outline: thin dotted;
                outline: 5px auto -webkit-focus-ring-color;
                outline-offset: -2px;
            }
            .btn:hover, .btn:focus {
                color: #333;
                text-decoration: none;
            }
            .btn:active, .btn.active {
                background-image: none;
                outline: 0;
                -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
                box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
            }
            .btn.disabled, .btn[disabled], fieldset[disabled] .btn {
                pointer-events: none;
                cursor: not-allowed;
                filter: alpha(opacity=65);
                -webkit-box-shadow: none;
                box-shadow: none;
                opacity: .65;
            }
            .btn-default {
                color: #28A7AD;
                background-color: #fff;
                border-color: #ccc;
            }
            .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
                color: #28A7AD;
                background-color: #ebebeb;
                border-color: #adadad;
            }
            .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
                background-image: none;
            }
            .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active {
                background-color: #fff;
                border-color: #28A7AD;
            }
            .btn-default .badge {
                color: #fff;
                background-color: #333;
            }
		</style>
	</head>
	<body>
		<div class="container" id="container">
			<!--			<div class="head" id="head"></div>
			-->
			<div class="main" id="main">
				<!--				<div class="logo"></div>
				-->
				<div style="text-align: center; font-size: 1.6em; font-weight: bold;padding-bottom: 3%;">
					工单信息
				</div>
				<form class="form-horizontal">
					<div style="width:96%;margin-left:auto;margin-right:auto;border-top: 0.1em dashed #cccccc;height: 0.1em;overflow:hidden; "></div>
					<div class="form-group">
						<label class="label">机器序列号:</label>
						<input type="text" class="form-control" value="${repair.serialNumber}" readonly="readonly">
					</div>
					<div class="form-group">
						<label class="label">机器序地址:</label>
						<input type="text" class="form-control" value="${repair.machineAddress}" readonly="readonly">
					</div>
                    <div class="form-group">
                        <label class="label">故障代码:</label>
                        <input type="text" class="form-control" value="${repair.breakCode}" readonly="readonly">
                    </div>
					<div class="form-group">
						<label class="label">故障信息:</label>
						<textarea class="form-control" readonly="readonly">${repair.faultInfo}</textarea>
					</div>
					<div class="form-group">
						<label class="label">报修时间:</label>
						<input type="text" class="form-control" value="${repair.repairDateStr}" readonly="readonly">
					</div>
					<div class="form-group">
						<label class="label">期望维修时间:</label>
						<input type="text" class="form-control" value="${repair.expectedRepairTimeStr}" readonly="readonly">
					</div>
					<div class="form-group">
						<label class="label">维修人:</label>
						<input type="text" class="form-control" value="${repair.maintenanceUser}" readonly="readonly">
					</div>
					<div class="form-group">
						<label class="label">备注信息:</label>
						<input type="text" class="form-control" value="${repair.maintenanceRemark}" readonly="readonly">
					</div>
					<div class="form-group">
						<label class="label">状态:</label>
						<input type="text" class="form-control" value="${repair.statusStr}" readonly="readonly">
					</div>
					<c:if test="${repair.status == 2}">
						<div class="form-group">
							<label class="label">预约维修时间:</label>
							<input type="text" class="form-control" value="${repair.planRepairTimeStr}" readonly="readonly">
						</div>
					</c:if>
					<c:if test="${repair.status == 6}">
						<div class="form-group">
							<label class="label">反馈信息:</label>
							<input type="text" class="form-control" value="${repair.feedbackInfo}" readonly="readonly">
						</div>
					</c:if>
                    <div class="form-group">
                        <button type="button" class="btn btn-default" style="width: 90%;" id="prevBtn">
                            返回
                        </button>
                    </div>
				</form>
			</div>
		</div>
		<script>
			document.body.onload = function() {
				var clientHeight = document.body.clientHeight;
				document.getElementById('container').style.height = clientHeight + 'px';
				var main = document.getElementById('main');
				main.style.minHeight = 0.96 * clientHeight + 'px';
				var formGroups = document.getElementsByClassName('form-group');
  				for(var i=0,j=formGroups.length; i<j; i++){
  					if(i==0){
  						formGroups[i].style.paddingTop = 0.03* clientHeight + 'px';
  					}else{
  						 formGroups[i].style.paddingTop = 0.02* clientHeight + 'px';
  					}
  				}
                document.getElementById('prevBtn').onclick = function(){
                    window.location.href = '<%=request.getContextPath()%>/weixin/repair/list/${openId}?openId=${openId}'
                }
			}
		</script>
	</body>
</html>